/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sirtet.tetris.program;

import sirtet.tetris.RandomPieceProvider;

/**
 *
 * @author guangwei.zhu
 */
public class RandomPieceGenerator {

    /**
     * Main entry of the program.
     * @param args One argument indicating the number of pieces
     */
    public static void main(String args[]) {

        if (args.length != 1)
        {
            System.err.println("Usage: java sirtet.tetris.main." +
                    "RandomPieceGenerator <numsquare> <numpieces>");
            return;
        }

        int numpieces = Integer.valueOf(args[0]);
        RandomPieceProvider provider = new RandomPieceProvider();

        for (int i = 0; i < numpieces; ++i)
        {
            System.out.println(provider.requestPiece());
        }
    }

}
